package com.lan.exception;

import com.lan.viewObject.SysResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 系统全局异常处理.
 * */
@RestControllerAdvice
public class SysException {

    @ExceptionHandler(RuntimeException.class)
    public SysResult exception(Exception e){
        e.printStackTrace();
        return SysResult.fail();
    }
}
